DWTEST ;CLD/JOLLIS-FileMan Web Tools Testing Code ;8:01 AM  30 Aug 2011
 ;;0.9;FileMan Web Tools;****;Aug 30, 2011
 ;;$Id: DWTEST.m 3 2011-08-30 14:05:56Z chocolatejollis38@gmail.com $

TREE(FILENUM,LEVEL)
 N NUMBERS,LINE,CNT,SUBFILE,I,J
 S CNT=$$FLDNUMS^DWDIQ(FILENUM,.NUMBERS)
 F I=1:1:CNT  D
 .F J=1:1:LEVEL W "-"
 .W "   "_$$FLDNAME^DWDIQ(FILENUM,NUMBERS(I))_" ("_$$FLDTYPE^DWDIQ(FILENUM,NUMBERS(I))_")",!
 .S SUBFILE=$$SUBFILE^DWDIQ(FILENUM,NUMBERS(I))
 .I SUBFILE'=0 D TREE(SUBFILE,LEVEL+1)
 Q